<div class="blockBox lx blue">
    <div class="label">
        <h1>按专业查看</h1>
        <div class="curl">&nbsp;</div>
    </div>

    <?php
    $i = 0;
    foreach( $terms as $term ) {
         $div_class =  $i ==0 ? "firstItem " : ' ';
         $i++;
         $link = url('consultant-list/'.$term->tid);

         if( $term->tid ==  arg(1) )
                 $div_class .= "selectedTextBox"
     ?>
    <div class="textBox  <?php print $div_class; ?>">
            <a href="<?php print $link; ?>" title="<?php print $term->name; ?>"><?php print $term->name; ?></a>
    </div>
    <?php } ?>
</div>